package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * SubscriptionChange entity. @author MyEclipse Persistence Tools <b><i>powered
 * by Belev</i></b>
 */
@Entity
@Table(name = "subsciption_changes")
@GeneratorKey(tableName = "subsciption_changes")
public class SubscriptionChangeVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -6675829431998827105L;

	@Column(name = "accepted", nullable = false)
	private boolean accepted;

	@Column(name = "change_request_date", nullable = false, length = 23)
	private Date changeRequestDate;

	@Temporal(TemporalType.DATE)
	@Column(name = "date_end", nullable = false, length = 10)
	private Date dateEnd;

	@Temporal(TemporalType.DATE)
	@Column(name = "date_start", nullable = false, length = 10)
	private Date dateStart;

	@Column(name = "rejected", nullable = false)
	private boolean rejected;

	@Column(name = "remark")
	private String remark;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "request_employee_id", nullable = false)
	private EmployeeVO requestEmployee;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "structure_id", nullable = false)
	private StructureVO structure;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subscription_id", nullable = false)
	private SubscriptionVO subscription;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subscription_plan_id", nullable = false)
	private SubscriptionPlanVO subscriptionPlan;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "support_empoyee_id")
	private EmployeeVO supportEmpoyee;

	/** default constructor */
	public SubscriptionChangeVO() {
		super();
	}

	/** @return the changeRequestDate */
	public Date getChangeRequestDate() {
		return this.changeRequestDate;
	}

	/** @return the dateEnd */
	public Date getDateEnd() {
		return this.dateEnd;
	}

	/** @return the dateStart */
	public Date getDateStart() {
		return this.dateStart;
	}

	/** @return the remark */
	public String getRemark() {
		return this.remark;
	}

	/** @return the requestEmployee */
	public EmployeeVO getRequestEmployee() {
		return this.requestEmployee;
	}

	/** @return the structure */
	public StructureVO getStructure() {
		return this.structure;
	}

	/** @return the subscription */
	public SubscriptionVO getSubscription() {
		return this.subscription;
	}

	/** @return the subscriptionPlan */
	public SubscriptionPlanVO getSubscriptionPlan() {
		return this.subscriptionPlan;
	}

	/** @return the supportEmpoyee */
	public EmployeeVO getSupportEmpoyee() {
		return this.supportEmpoyee;
	}

	/** @return the accepted */
	public boolean isAccepted() {
		return this.accepted;
	}

	/** @return the rejected */
	public boolean isRejected() {
		return this.rejected;
	}

	/** @param accepted */
	public void setAccepted(boolean accepted) {
		this.accepted = accepted;
	}

	/** @param changeRequestDate */
	public void setChangeRequestDate(Date changeRequestDate) {
		this.changeRequestDate = changeRequestDate;
	}

	/** @param dateEnd */
	public void setDateEnd(Date dateEnd) {
		this.dateEnd = dateEnd;
	}

	/** @param dateStart */
	public void setDateStart(Date dateStart) {
		this.dateStart = dateStart;
	}

	/** @param rejected */
	public void setRejected(boolean rejected) {
		this.rejected = rejected;
	}

	/** @param remark */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/** @param requestEmployee */
	public void setRequestEmployee(EmployeeVO requestEmployee) {
		this.requestEmployee = requestEmployee;
	}

	/** @param structure */
	public void setStructure(StructureVO structure) {
		this.structure = structure;
	}

	/** @param subscription */
	public void setSubscription(SubscriptionVO subscription) {
		this.subscription = subscription;
	}

	/** @param subscriptionPlan */
	public void setSubscriptionPlan(SubscriptionPlanVO subscriptionPlan) {
		this.subscriptionPlan = subscriptionPlan;
	}

	/** @param supportEmpoyee */
	public void setSupportEmpoyee(EmployeeVO supportEmpoyee) {
		this.supportEmpoyee = supportEmpoyee;
	}

}